<template>
  <!-- 净借记限额管理通知查询明细页面弹出框-->
  <el-dialog
    title="净借记限额管理通知查询明细"
    center
    :visible.sync="open"
    width="1024px"
    :close-on-click-modal="true"
    @close="closeFn"
  >
    <el-form ref="detailsForm" :model="formData" label-width="180px" :disabled="true">
      <el-card class="form-card txnInfo-card">
        <div slot="header" class="label-header-msg">
          <span>基本信息</span>
        </div>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="交易流水号：" prop="id">
              <el-input v-model="formData.id" placeholder="交易流水号" />
            </el-form-item>
          </el-col>
          <el-col :span="12"></el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="报文标识号：" prop="pkgId">
              <el-input v-model="formData.pkgId" placeholder="报文标识号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="工作日期：" prop="workDate">
              <el-date-picker
                v-model="formData.workDate"
                type="date"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="接收参与机构：" prop="directReceiver">
              <el-input v-model="formData.directReceiver" placeholder="接收参与机构" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="接收参与机构名：" prop="directReceiverName">
              <el-input v-model="formData.directReceiverName" placeholder="接收参与机构名" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="通知类型：" prop="ntfctnType">
              <el-select v-model="formData.ntfctnType" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.NTFCTN_TYPE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>
      <div v-if="this.formData.ntfctnType == 'LC00'">
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>交易信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="调整的额度种类：" prop="lc00OprClass">
                <el-select v-model="formData.lc00OprClass" placeholder="请选择" style="width: 100%">
                  <el-option
                    v-for="dict in dictMap.OPR_CLASS"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="调整类型：" prop="lc00OprType">
                <el-select v-model="formData.lc00OprType" placeholder="请选择" style="width: 100%">
                  <el-option
                    v-for="dict in dictMap.OPERATIONTYPECODE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="清算行行号：" prop="lc00StBrno">
                <el-input v-model="formData.lc00StBrno" placeholder="清算行行号" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="清算行行名：" prop="lc00StBrnoName">
                <el-input v-model="formData.lc00StBrnoName" placeholder="清算行行名" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="圈存资金货币币种：" prop="cdtldCurcd">
                <el-input v-model="formData.cdtldCurcd" placeholder="圈存资金货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="圈存资金：" prop="lc00Cdtld">
                <el-input v-model="formData.lc00Cdtld" placeholder="圈存资金" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="质押额度货币币种：" prop="ttlpldgCurcd">
                <el-input v-model="formData.ttlpldgCurcd" placeholder="质押额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="质押额度：" prop="lc00Ttlpldgval">
                <el-input v-model="formData.lc00Ttlpldgval" placeholder="质押额度" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="授信额度货币币种：" prop="cdtxtnsnCurcd">
                <el-input v-model="formData.cdtxtnsnCurcd" placeholder="授信额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="授信额度：" prop="lc00Cdtxtnsnlmt">
                <el-input v-model="formData.lc00Cdtxtnsnlmt" placeholder="授信额度" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="净借记限额货币币种：" prop="netdbtCurcd">
                <el-input v-model="formData.netdbtCurcd" placeholder="净借记限额货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="净借记限额：" prop="lc00Netdbtlmt">
                <el-input v-model="formData.lc00Netdbtlmt" placeholder="净借记限额" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="当前可用净借记限额货币币种：" prop="avlblCurcd">
                <el-input v-model="formData.avlblCurcd" placeholder="当前可用净借记限额货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="当前可用净借记限额：" prop="lc00Avlblnetdbt">
                <el-input v-model="formData.lc00Avlblnetdbt" placeholder="当前可用净借记限额" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="报文接收时间：" prop="rcvTime">
                <el-date-picker
                  v-model="formData.rcvTime"
                  type="date"
                  value-format="yyyyMMdd"
                  placeholder="选择时间"
                  style="width: 100%"
                ></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12"></el-col>
          </el-row>

          <el-row>
            <el-col :span="24">
              <el-form-item label="备注：" prop="remarks">
                <el-input
                  type="textarea"
                  v-model="formData.remarks"
                  placeholder="备注"
                  maxlength="210"
                  show-word-limit
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </div>

      <div v-if="this.formData.ntfctnType == 'LC01'">
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>交易信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="预警开启关闭类型：" prop="lc01SwitchType">
                <el-select v-model="formData.lc01SwitchType" placeholder="请选择" style="width: 100%">
                  <el-option
                    v-for="dict in dictMap.SWITCHTYPECODE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12"></el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="监视行行号：" prop="lc01WatchBrno">
                <el-input v-model="formData.lc01WatchBrno" placeholder="监视行行号" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="监视行行名：" prop="lc01WatchBrnoName">
                <el-input v-model="formData.lc01WatchBrnoName" placeholder="监视行行名" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="净借记可用额度警戒值币种：" prop="wrngCurcd">
                <el-input v-model="formData.wrngCurcd" placeholder="净借记可用额度警戒值货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="净借记可用额度警戒值：" prop="lc01Avlblnetdbtwrngval">
                <el-input v-model="formData.lc01Avlblnetdbtwrngval" placeholder="净借记可用额度警戒值" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="报文接收时间：" prop="rcvTime">
                <el-date-picker
                  v-model="formData.rcvTime"
                  type="date"
                  value-format="yyyyMMdd"
                  placeholder="选择时间"
                  style="width: 100%"
                ></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12"></el-col>
          </el-row>

          <el-row>
            <el-col :span="24">
              <el-form-item label="备注：" prop="remarks">
                <el-input
                  type="textarea"
                  v-model="formData.remarks"
                  placeholder="备注"
                  maxlength="210"
                  show-word-limit
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </div>
      <div v-if="this.formData.ntfctnType == 'LC02'">
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>交易信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="直接参与者行号：" prop="lc02DirectBrno">
                <el-input v-model="formData.lc02DirectBrno" placeholder="直接参与者行号" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="直接参与者行名：" prop="lc02DirectBrnoName">
                <el-input v-model="formData.lc02DirectBrnoName" placeholder="直接参与者行名" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="已分配质押额度货币币种：" prop="dstrbtnpldgCurcd">
                <el-input v-model="formData.dstrbtnpldgCurcd" placeholder="已分配质押额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="已分配质押额度：" prop="lc02Dstrbtnpldgval">
                <el-input v-model="formData.lc02Dstrbtnpldgval" placeholder="已分配质押额度" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="报文接收时间：" prop="rcvTime">
                <el-date-picker
                  v-model="formData.rcvTime"
                  type="date"
                  value-format="yyyyMMdd"
                  placeholder="选择时间"
                  style="width: 100%"
                ></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12"></el-col>
          </el-row>

          <el-row>
            <el-col :span="24">
              <el-form-item label="备注：" prop="remarks">
                <el-input
                  type="textarea"
                  v-model="formData.remarks"
                  placeholder="备注"
                  maxlength="210"
                  show-word-limit
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </div>

      <div v-if="this.formData.ntfctnType == 'LC03'">
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>交易信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="通知类型：" prop="lc03NtfctnType">
                <el-select v-model="formData.lc03NtfctnType" placeholder="请选择" style="width: 100%">
                  <el-option
                    v-for="dict in dictMap.LC03_NTFCTN_TYPE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12"></el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="法人机构行号：" prop="lc03LpBrno">
                <el-input v-model="formData.lc03LpBrno" placeholder="法人机构行号" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="法人机构行名：" prop="lc03LpBrnoName">
                <el-input v-model="formData.lc03LpBrnoName" placeholder="法人机构行名" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原未分配额度货币币种：" prop="lc03OrgnlnotCurcd">
                <el-input v-model="formData.lc03OrgnlnotCurcd" placeholder="原未分配额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="原未分配额度：" prop="lc03Orgnlnotdstrbtn">
                <el-input v-model="formData.lc03Orgnlnotdstrbtn" placeholder="原未分配额度" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原已分配额度货币币种：" prop="lc03OrgnlisCurcd">
                <el-input v-model="formData.lc03OrgnlisCurcd" placeholder="原已分配额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="原已分配额度：" prop="lc03Orgnlisdstrbtn">
                <el-input v-model="formData.lc03Orgnlisdstrbtn" placeholder="原已分配额度" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="现未分配额度货币币种：" prop="notCurcd">
                <el-input v-model="formData.notCurcd" placeholder="现未分配额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="现未分配额度：" prop="lc03Notdstrbtn">
                <el-input v-model="formData.lc03Notdstrbtn" placeholder="现未分配额度" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="现已分配额度货币币种：" prop="isCurcd">
                <el-input v-model="formData.isCurcd" placeholder="现已分配额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="现已分配额度：" prop="lc03Isdstrbtn">
                <el-input v-model="formData.lc03Isdstrbtn" placeholder="现已分配额度" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="报文接收时间：" prop="rcvTime">
                <el-date-picker
                  v-model="formData.rcvTime"
                  type="date"
                  value-format="yyyyMMdd"
                  placeholder="选择时间"
                  style="width: 100%"
                ></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12"></el-col>
          </el-row>

          <el-row>
            <el-col :span="24">
              <el-form-item label="备注：" prop="remarks">
                <el-input
                  type="textarea"
                  v-model="formData.remarks"
                  placeholder="备注"
                  maxlength="210"
                  show-word-limit
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </div>
      <div v-if="this.formData.ntfctnType == 'LC04'">
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>交易信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="法人机构行号：" prop="lc04LpBrno">
                <el-input v-model="formData.lc04LpBrno" placeholder="法人机构行号" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="法人机构行名：" prop="lc04LpBrnoName">
                <el-input v-model="formData.lc04LpBrnoName" placeholder="法人机构行名" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原未分配额度货币币种：" prop="lc04OrgnlnotCurcd">
                <el-input v-model="formData.lc04OrgnlnotCurcd" placeholder="原未分配额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="原未分配额度：" prop="lc04Orgnlnotdstrbtn">
                <el-input v-model="formData.lc04Orgnlnotdstrbtn" placeholder="原未分配额度" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原已分配额度货币币种：" prop="lc04OrgnlisCurcd">
                <el-input v-model="formData.lc04OrgnlisCurcd" placeholder="原已分配额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="原已分配额度：" prop="lc04Orgnlisdstrbtn">
                <el-input v-model="formData.lc04Orgnlisdstrbtn" placeholder="原已分配额度" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="强制调减额度货币币种：" prop="forcedwnCurcd">
                <el-input v-model="formData.forcedwnCurcd" placeholder="强制调减额度货币币种" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="强制调减额：" prop="lc04Forcedwn">
                <el-input v-model="formData.lc04Forcedwn" placeholder="强制调减额" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="已借记分支机构数目：" prop="lc04Brnchqty">
                <el-input v-model="formData.lc04Brnchqty" placeholder="已借记分支机构数目" />
              </el-form-item>
            </el-col>
            <el-col :span="12"></el-col>
          </el-row>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="报文接收时间：" prop="rcvTime">
                <el-date-picker
                  v-model="formData.rcvTime"
                  type="date"
                  value-format="yyyyMMdd"
                  placeholder="选择时间"
                  style="width: 100%"
                ></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12"></el-col>
          </el-row>

          <el-row>
            <el-col :span="24">
              <el-form-item label="备注：" prop="remarks">
                <el-input
                  type="textarea"
                  v-model="formData.remarks"
                  placeholder="备注"
                  maxlength="210"
                  show-word-limit
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </div>
    </el-form>
    <div slot="footer" class="dialog-footer" v-if="this.formData.ntfctnType == 'LC02'">
      <el-button type="primary" @click="checkDetails">查看明细</el-button>
    </div>
    <check-page ref="checkPageDialog" :formData="formData"></check-page>
  </el-dialog>
</template>
<script>
import CheckPage from "./checkPage";
export default {
  name: "NetDetails",
  components: {
    CheckPage,
  },
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      // 是否显示弹出层
      open: false,
    };
  },
  mounted() {},
  methods: {
    //  查看明细按钮操作
    checkDetails() {
      this.$refs.checkPageDialog.show();
    },
    // 表单重置
    reset() {
      this.resetForm("detailsForm");
      // this.$set(this, "form", {});
    },
    closeFn() {
      this.open = false;
    },
    show() {
      this.open = true;
    },

    cancel() {
      this.open = false;
      this.reset();
    },
  },
};
</script>
